package com.samuel.algorithm.huawei;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class NiuKeMain {

    public static void test3() {
        try (Scanner scanner = new Scanner(System.in)) {
            String inputStr = scanner.nextLine();
     
        }
    }

    public static void test2() {
        try (Scanner scanner = new Scanner(System.in)) {
            int arrayNum = scanner.nextInt();
            Set<Integer> nums = new HashSet<>();
            for (int i = 0; i < arrayNum; i++) {
                nums.add(scanner.nextInt());
            }
            nums.stream().sorted((Integer::compareTo)).forEach(System.out::println);
        }

    }

    public static void test1() {
        try (Scanner scanner = new Scanner(System.in)) {
            String inputStr = scanner.nextLine();
            String inputChar = scanner.nextLine();
            char checkChar = inputChar.toLowerCase().charAt(0);
            if (null == inputStr || inputStr.isEmpty()) {
                System.out.println(0);
            } else {
                int charNum = 0;
                for (char item : inputStr.toLowerCase().toCharArray()) {
                    if (checkChar == item) {
                        charNum++;
                    }
                }
                System.out.println(charNum);
            }
        }
    }

    public static void main(String[] args) {
        test2();
    }
}
